﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DCHealthCheck.MvcWeb.Classes.ViewModels.PendingReplicationsViewModel>" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="DCHealthCheck.DomainModel" %>
<%@ Import Namespace="DCHealthCheck.Common" %>
<%@ Import Namespace="DCHealthCheck.MvcWeb.Classes" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%:Global.ApplicationName%>::<%:Model.ControllerName%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="infobox">
    </div>
    <div id="contents">
        <div id="leftcontainer">
            <%Html.RenderPartial("TableHeader", this.Model); %>
            <div class="table-horizontal-scroll-wrapper">
                <table id="reportTable" class="report-table" cellpadding="0" cellspacing="0">
                    <thead>
                        <tr>
                            <th style="width: 160px; min-width: 160px; max-width: 160px;">
                                <%:Model.GetSortColumnLink(this.Html, "DC", "Sort by", "SystemInfo.DomainController.SamAccountName")%>
                            </th>
                            <th style="width: 160px; min-width: 160px; max-width: 160px;">
                                <%:Model.GetSortColumnLink(this.Html, "SourceServer", "Sort by", "SourceServer")%>
                            </th>
                            <th style="width: 140px; min-width: 140px; max-width: 140px;">
                                <%:Model.GetSortColumnLink(this.Html, "PartitionName", "Sort by", "PartitionName")%>
                            </th>
                            <th style="width: 150px; min-width: 150px; max-width: 150px;">
                                <%:Model.GetSortColumnLink(this.Html, "TimeEnqueued", "Sort by", "TimeEnqueued")%>
                            </th>
                            <th style="width: 100px; min-width: 100px; max-width: 100px;">
                                <%:Model.GetSortColumnLink(this.Html, "OpNumber", "Sort by", "OperationNumber")%>
                            </th>
                            <th style="width: 140px; min-width: 140px; max-width: 140px;">
                                <%:Model.GetSortColumnLink(this.Html, "Type", "Sort by", "OperationType")%>
                            </th>
                            <th style="width: 100px; min-width: 100px; max-width: 100px;">
                                <%:Model.GetSortColumnLink(this.Html, "Priority", "Sort by", "Priority")%>
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <% foreach (var item in Model.PendingReplications)
                           { %>
                        <tr>
                            <td style="width: 160px; min-width: 160px; max-width: 160px;" title="<%:item.SystemInfo.DomainController.SamAccountNameFriendly%>">
                                <%:item.SystemInfo.DomainController.SamAccountNameFriendly%>
                            </td>
                            <td style="width: 160px; min-width: 160px; max-width: 160px;" title="<%:Html.DisplayFor(modelItem => item.SourceServer) %>">
                                <%:item.SourceServer.SingleLabelName()%>
                            </td>
                            <td style="width: 140px; min-width: 140px; max-width: 140px;" title="<%:Html.DisplayFor(modelItem => item.PartitionName) %>">
                                <%:Html.DisplayFor(modelItem => item.PartitionName)%>
                            </td>
                            <td style="width: 150px; min-width: 150px; max-width: 150px;" title="<%:item.TimeEnqueued.LongDateFriendly()%>">
                                <%:item.TimeEnqueued.LongDateFriendly()%>
                            </td>
                            <td style="width: 100px; min-width: 100px; max-width: 100px;">
                                <%:Html.DisplayFor(modelItem => item.OperationNumber)%>
                            </td>
                            <td style="width: 140px; min-width: 140px; max-width: 140px;" title="<%:Html.DisplayFor(modelItem => item.OperationType)%>">
                                <%:Html.DisplayFor(modelItem => item.OperationType)%>
                            </td>
                            <td style="width: 100px; min-width: 100px; max-width: 100px;" title="<%:Html.DisplayFor(modelItem => item.Priority)%>">
                                <%:Html.DisplayFor(modelItem => item.Priority)%>
                            </td>
                        </tr>
                        <% } %>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsSection" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {

        });
    </script>
</asp:Content>
